using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class IphoneRegRequest : GeneratedMessageLite<IphoneRegRequest, IphoneRegRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<IphoneRegRequest, IphoneRegRequest.Builder>
		{
			private bool resultIsReadOnly;
			private IphoneRegRequest result;
			protected override IphoneRegRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override IphoneRegRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override IphoneRegRequest DefaultInstanceForType
			{
				get
				{
					return IphoneRegRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public string Token
			{
				get
				{
					return this.result.Token;
				}
				set
				{
					this.SetToken(value);
				}
			}
			public string Sound
			{
				get
				{
					return this.result.Sound;
				}
				set
				{
					this.SetSound(value);
				}
			}
			public uint Status
			{
				get
				{
					return this.result.Status;
				}
				set
				{
					this.SetStatus(value);
				}
			}
			public string VoipSound
			{
				get
				{
					return this.result.VoipSound;
				}
				set
				{
					this.SetVoipSound(value);
				}
			}
			public Builder()
			{
				this.result = IphoneRegRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(IphoneRegRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private IphoneRegRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					IphoneRegRequest other = this.result;
					this.result = new IphoneRegRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override IphoneRegRequest.Builder Clear()
			{
				this.result = IphoneRegRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override IphoneRegRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new IphoneRegRequest.Builder(this.result);
				}
				return new IphoneRegRequest.Builder().MergeFrom(this.result);
			}
			public override IphoneRegRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override IphoneRegRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is IphoneRegRequest)
				{
					return this.MergeFrom((IphoneRegRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override IphoneRegRequest.Builder MergeFrom(IphoneRegRequest other)
			{
				return this;
			}
			public override IphoneRegRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override IphoneRegRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(IphoneRegRequest._iphoneRegRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = IphoneRegRequest._iphoneRegRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 18u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
						if (num3 == 18u)
						{
							this.result.hasToken = input.ReadString(ref this.result.token_);
							continue;
						}
					}
					else
					{
						if (num3 == 26u)
						{
							this.result.hasSound = input.ReadString(ref this.result.sound_);
							continue;
						}
						if (num3 == 32u)
						{
							this.result.hasStatus = input.ReadUInt32(ref this.result.status_);
							continue;
						}
						if (num3 == 42u)
						{
							this.result.hasVoipSound = input.ReadString(ref this.result.voipSound_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public IphoneRegRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public IphoneRegRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public IphoneRegRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public IphoneRegRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public IphoneRegRequest.Builder SetToken(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasToken = true;
				this.result.token_ = value;
				return this;
			}
			public IphoneRegRequest.Builder ClearToken()
			{
				this.PrepareBuilder();
				this.result.hasToken = false;
				this.result.token_ = "";
				return this;
			}
			public IphoneRegRequest.Builder SetSound(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasSound = true;
				this.result.sound_ = value;
				return this;
			}
			public IphoneRegRequest.Builder ClearSound()
			{
				this.PrepareBuilder();
				this.result.hasSound = false;
				this.result.sound_ = "";
				return this;
			}
			public IphoneRegRequest.Builder SetStatus(uint value)
			{
				this.PrepareBuilder();
				this.result.hasStatus = true;
				this.result.status_ = value;
				return this;
			}
			public IphoneRegRequest.Builder ClearStatus()
			{
				this.PrepareBuilder();
				this.result.hasStatus = false;
				this.result.status_ = 0u;
				return this;
			}
			public IphoneRegRequest.Builder SetVoipSound(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasVoipSound = true;
				this.result.voipSound_ = value;
				return this;
			}
			public IphoneRegRequest.Builder ClearVoipSound()
			{
				this.PrepareBuilder();
				this.result.hasVoipSound = false;
				this.result.voipSound_ = "";
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int TokenFieldNumber = 2;
		public const int SoundFieldNumber = 3;
		public const int StatusFieldNumber = 4;
		public const int VoipSoundFieldNumber = 5;
		private static readonly IphoneRegRequest defaultInstance;
		private static readonly string[] _iphoneRegRequestFieldNames;
		private static readonly uint[] _iphoneRegRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasToken;
		private string token_ = "";
		private bool hasSound;
		private string sound_ = "";
		private bool hasStatus;
		private uint status_;
		private bool hasVoipSound;
		private string voipSound_ = "";
		private int memoizedSerializedSize = -1;
		public static IphoneRegRequest DefaultInstance
		{
			get
			{
				return IphoneRegRequest.defaultInstance;
			}
		}
		public override IphoneRegRequest DefaultInstanceForType
		{
			get
			{
				return IphoneRegRequest.DefaultInstance;
			}
		}
		protected override IphoneRegRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public string Token
		{
			get
			{
				return this.token_;
			}
		}
		public string Sound
		{
			get
			{
				return this.sound_;
			}
		}
		public uint Status
		{
			get
			{
				return this.status_;
			}
		}
		public string VoipSound
		{
			get
			{
				return this.voipSound_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.BaseRequest.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasToken)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.Token);
				}
				if (this.hasSound)
				{
					num += CodedOutputStream.ComputeStringSize(3, this.Sound);
				}
				if (this.hasStatus)
				{
					num += CodedOutputStream.ComputeUInt32Size(4, this.Status);
				}
				if (this.hasVoipSound)
				{
					num += CodedOutputStream.ComputeStringSize(5, this.VoipSound);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private IphoneRegRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] iphoneRegRequestFieldNames = IphoneRegRequest._iphoneRegRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, iphoneRegRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasToken)
			{
				output.WriteString(2, iphoneRegRequestFieldNames[3], this.Token);
			}
			if (this.hasSound)
			{
				output.WriteString(3, iphoneRegRequestFieldNames[1], this.Sound);
			}
			if (this.hasStatus)
			{
				output.WriteUInt32(4, iphoneRegRequestFieldNames[2], this.Status);
			}
			if (this.hasVoipSound)
			{
				output.WriteString(5, iphoneRegRequestFieldNames[4], this.VoipSound);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasToken)
			{
				num ^= this.token_.GetHashCode();
			}
			if (this.hasSound)
			{
				num ^= this.sound_.GetHashCode();
			}
			if (this.hasStatus)
			{
				num ^= this.status_.GetHashCode();
			}
			if (this.hasVoipSound)
			{
				num ^= this.voipSound_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			IphoneRegRequest iphoneRegRequest = value as IphoneRegRequest;
			return iphoneRegRequest != null && (this.hasBaseRequest == iphoneRegRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(iphoneRegRequest.baseRequest_))) && (this.hasToken == iphoneRegRequest.hasToken && (!this.hasToken || this.token_.Equals(iphoneRegRequest.token_))) && (this.hasSound == iphoneRegRequest.hasSound && (!this.hasSound || this.sound_.Equals(iphoneRegRequest.sound_))) && (this.hasStatus == iphoneRegRequest.hasStatus && (!this.hasStatus || this.status_.Equals(iphoneRegRequest.status_))) && (this.hasVoipSound == iphoneRegRequest.hasVoipSound && (!this.hasVoipSound || this.voipSound_.Equals(iphoneRegRequest.voipSound_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<IphoneRegRequest, IphoneRegRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<IphoneRegRequest, IphoneRegRequest.Builder>.PrintField("Token", this.hasToken, this.token_, writer);
			GeneratedMessageLite<IphoneRegRequest, IphoneRegRequest.Builder>.PrintField("Sound", this.hasSound, this.sound_, writer);
			GeneratedMessageLite<IphoneRegRequest, IphoneRegRequest.Builder>.PrintField("Status", this.hasStatus, this.status_, writer);
			GeneratedMessageLite<IphoneRegRequest, IphoneRegRequest.Builder>.PrintField("VoipSound", this.hasVoipSound, this.voipSound_, writer);
		}
		public static IphoneRegRequest ParseFrom(byte[] data)
		{
			return IphoneRegRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private IphoneRegRequest MakeReadOnly()
		{
			return this;
		}
		public static IphoneRegRequest.Builder CreateBuilder()
		{
			return new IphoneRegRequest.Builder();
		}
		public override IphoneRegRequest.Builder ToBuilder()
		{
			return IphoneRegRequest.CreateBuilder(this);
		}
		public override IphoneRegRequest.Builder CreateBuilderForType()
		{
			return new IphoneRegRequest.Builder();
		}
		public static IphoneRegRequest.Builder CreateBuilder(IphoneRegRequest prototype)
		{
			return new IphoneRegRequest.Builder(prototype);
		}
		static IphoneRegRequest()
		{
			IphoneRegRequest.defaultInstance = new IphoneRegRequest().MakeReadOnly();
			IphoneRegRequest._iphoneRegRequestFieldNames = new string[]
			{
				"BaseRequest",
				"Sound",
				"Status",
				"Token",
				"VoipSound"
			};
			IphoneRegRequest._iphoneRegRequestFieldTags = new uint[]
			{
				10u,
				26u,
				32u,
				18u,
				42u
			};
			object.ReferenceEquals(micromsg.Proto.IphoneRegRequest.Descriptor, null);
		}
	}
}
